-- Welcome to CalcPad!

-- You can use CalcPad like a simple calculator. Just enter expressions, and press Enter (or press Return while holding the Command key) to see a result.  For example:

3*5^2

-- CalcPad honors the usual operator precedence, that is, exponentiation is done before multiplication, which is done before addition.  You can also use parentheses to group terms:

(3*5)^2

-- CalcPad understands most common units, and carries them through the calculation.  For example:

10 m / 5 sec

-- Spaces in an expression are usually optional; the above example could also be written as:

10m/5sec

-- Of course, a space is needed to separate words that would otherwise run together, for example, "m sec" is meter-seconds, but "msec" is a millisecond.

-- Comments start with "--", as in this sentence.

-- You can refer to the value of the previous expression with the special "#" symbol:

10 m/sec
# * 2.5

-- You can assign variables and define functions, too:

speed = distance/time
distance=10 m
time=5 sec
speed

distance=15 m
speed

f(x,y) = x^2 + y
f(2,3) + f(4,5)

-- CalcPad also has a wide variety of built-in functions as well, including: Abs, ACos, ASin, ATan, Ceil, Cos, Exp,  Floor, Log10, Ln, Round, Sign, Sin, Sqrt, and Tan.
